package com.commution.hit.common.sys;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.apache.struts2.ServletActionContext;

import com.commution.hit.domain.basic.Blog;
import com.commution.hit.service.BlogService;
import com.commution.hit.service.DocConverter;
import com.commution.hit.service.UserService;
import com.commution.hit.service.impl.DouBanMoviePipeline;
import com.commution.hit.service.impl.DoubanMovieSpaid;
import com.opensymphony.xwork2.ActionSupport;

/**
 * 所有action的基类
 */
public class BaseAction extends ActionSupport {
	private static final long serialVersionUID = -7050004500861248518L;
	
	protected UserService userService;
	protected DoubanMovieSpaid doubanMovieSpaid;
	protected BlogService  blogService;
	protected DocConverter docConverter;


	public DoubanMovieSpaid getDoubanMovieSpaid() {
		return doubanMovieSpaid;
	}

	public void setDoubanMovieSpaid(DoubanMovieSpaid doubanMovieSpaid) {
		this.doubanMovieSpaid = doubanMovieSpaid;
	}

	public UserService getUserService() {
		return userService;
	}

	public void setUserService(UserService userService) {
		this.userService = userService;
	}

	protected GridResult gridResult = new GridResult();
	/**
	 * 封装后的json结果集
	 */
	protected JsonResult jsonResult = new JsonResult();

	public JsonResult getJsonResult() {
		return jsonResult;
	}

	public void setJsonResult(JsonResult jsonResult) {
		this.jsonResult = jsonResult;
	}

	public GridResult getGridResult() {
		return gridResult;
	}

	public void setGridResult(GridResult gridResult) {
		this.gridResult = gridResult;
	}

	protected HttpServletRequest getRequest() {
		return ServletActionContext.getRequest();
	}

	protected HttpSession getSession() {
		return getRequest().getSession();
	}

	protected HttpServletResponse getResponse() {
		return ServletActionContext.getResponse();
	}

	public BlogService getBlogService() {
		return blogService;
	}

	public void setBlogService(BlogService blogService) {
		this.blogService = blogService;
	}

	public DocConverter getDocConverter() {
		return docConverter;
	}

	public void setDocConverter(DocConverter docConverter) {
		this.docConverter = docConverter;
	}
	
	

}